package com.shaokai.test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
public class MainRun {
    public static void main(String[] args) {
        //IOC容器
        ConfigurableApplicationContext run = SpringApplication.run(MainRun.class, args);
        for (String each : run.getBeanDefinitionNames()) {
            //显示所有springBoot自动配置的组件
            System.out.println(each);
        }
    }
}
